package com.example.nuc_ms_beta.app;

import android.app.Application;
import android.content.Context;

import cn.bmob.push.BmobPush;
import cn.bmob.v3.Bmob;
import cn.bmob.v3.BmobConfig;
import cn.bmob.v3.BmobInstallation;
import cn.sharesdk.framework.ShareSDK;

/**
 * Created by bnhc on 17-5-17.
 */

public class MyApplication extends Application {
    public static Context context;
    public static final String TAG = "Nuc_Ms_Debug";
    public static final String APPID = "3e227541238f87c17b82a0516df23be6";

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        BmobConfig config = new BmobConfig.Builder(this)
                //设置appkey
                .setApplicationId(APPID)
                //请求超时时间（单位为秒）：默认15s
                .setConnectTimeout(30)
                //文件分片上传时每片的大小（单位字节），默认512*1024
                .setUploadBlockSize(1024 * 1024)
                //文件的过期时间(单位为秒)：默认1800s
                .setFileExpiration(2500)
                .build();
        Bmob.initialize(config);
        BmobInstallation.getCurrentInstallation().save();
        BmobPush.startWork(context);
        ShareSDK.initSDK(context);
    }
}
